package com.cian.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.cian.entity.History;
import com.cian.entity.dto.AccountHistoryDTO;
import com.cian.entity.dto.GoodsHistoryDTO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;

import java.util.Date;
import java.util.List;

/**
 * <p>
 * 销售记录的历史表项 服务类
 * </p>
 *
 * @author Cian
 * @since 2021-03-15
 */
public interface IHistoryService extends IService<History> {
    @ApiModelProperty(value = "改变当日指定商品销售量，连带需要改变总销售价，商品余量")
    public boolean changeStock(String account, String serverCode, Date date, int coId, int stock);
    @ApiModelProperty(value = "改变当日指定商品进货量，连带需要改变商品余量")
    public boolean changeInput(String account, String serverCode, Date date, int coId, int input);
    @ApiModelProperty(value = "获取特定得历史记录")
    public History getHistory(String account, String serverCode, Date date, int coId);
    @ApiModelProperty(value = "获取账户在相应日期对应的历史记录")
    public AccountHistoryDTO obtainAccountHistory(String account, Date date);
    @ApiModelProperty(value = "获取账户中特定子模块相应日期对应的历史记录")
    public AccountHistoryDTO obtainServerHistoryForLine(String account, Date date, String serverCode);
    @ApiModelProperty(value = "获取账户中特定子模块相应日期对应的的商品销售数历史记录")
    public List<GoodsHistoryDTO> obtainGoodsHistoryForLine(String account, String serverCode, Date leftDate, Date rightDate);
    @ApiModelProperty(value = "获取账户中特定子模块相应日期对应的商品销售额历史记录")
    public List<GoodsHistoryDTO> obtainPriceHistoryForLine(String account, String serverCode, Date leftDate, Date rightDate);
}
